<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>会员中心-一览网</title>
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/member.css">
    <script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
    <script type="text/javascript" src="js/layui/layui.all.js"></script>
    <script type="text/javascript" src="js/common.js"></script>
</head>
<body>
<header>
    <div class="m_top">
        <div class="m_top_bar">
            <div class="m_top_login fl">
                <p><b>13814503433</b> <img src="images/right.png">  <a href="member_index.html">会员中心</a> | <a href="">退出</a></p>
            </div>
            <div class="m_top_search fl">
                <form method="get" action="">
                    <div class="m_search_warp">
                        <i class="ico ico-zoom"></i>
                        <input type="text" value="" placeholder="请输入化学品的中文名，英文名或CAS号" class="m_search_txt">
                    </div>
                    <input type="submit" value="搜索" class="m_search_sub">
                </form>
            </div>
            <div class="m_top_nav rg_menu fr">
                <ul>
                    <li><a href="index.html">平台首页</a><span>|</span></li>
                    <li><div class="show_qrcode"> <img src="images/er-icon.png" class="simple">二维码 <span>|</span><div class="tip-qrcode"><img src="images/qrcode.jpg"></div></div></li>
                    <li class="kf"><a href="javascript:;" class="td">客服中心</a><span>|</span>
                        <div class="kf_child hidden">
                            <ul>
                                <li><a href="help.html">帮助中心</a> </li>
                                <li><a href="feedback.html">反馈意见</a> </li>
                                <li><a href="contact.html">联系我们</a> </li>
                            </ul>
                        </div>
                    </li>
                    <li><a href=""  class="td">网站地图</a></li>
                </ul>
            </div>
        </div>
    </div>
</header>

<div class="clearfix"></div>

<div class="contain pt20">
    <div class="m_content">
        <div class="m_menu fl">
            <div class="mt_menu">
                <dl>
                    <dt class="mn1">会员首页</dt>
                    <dd><a href="member_index.html">会员首页</a></dd>
                </dl>
                <dl>
                    <dt class="mn2">采购中心</dt>
                    <dd><a href="member_buy_add.html">新增求购</a></dd>
                    <dd>
                        <a href="member_buy_list.html">求购管理</a>
                        <ol class="hidden">
                            <li><a href="">已报价</a></li>
                            <li><a href="">未报价</a></li>
                            <li><a href="">取消求购</a></li>
                            <li><a href="">暂时缺货</a></li>
                        </ol>
                    </dd>
                    <dd><a href="member_order_list.html">采购订单</a></dd>
                </dl>
                <dl>
                    <dt class="mn3">销售中心</dt>
                    <dd><a href="member_goods_add.html">上传目录</a></dd>
                    <dd><a href="member_goods_list.html">商品管理</a>
                        <ol class="hidden">
                            <li><a href="member_goods_list.html">已上架</a></li>
                            <li><a href="member_goods_list_down.html">已下架</a></li>
                            <li><a href="member_goods_list_check.html">待审核</a></li>
                        </ol>
                    </dd>
                    <dd><a href="member_inquiry_list.html">询单管理</a>
                        <ol class="hidden">
                            <li><a href="member_inquiry_list.html">未报价</a></li>
                            <li><a href="member_inquiry_list_had.html">已报价</a></li>
                            <li><a href="member_inquiry_list_abandon.html">已放弃</a></li>
                        </ol>
                    </dd>
                    <dd><a href="member_sell_list.html">销售订单</a></dd>
                </dl>
                <dl>
                    <dt class="mn4">账号管理</dt>
                    <dd><a href="member_account_attentions.html">我的关注</a></dd>
                    <dd class="on"><a href="member_account_informations.html">账号信息</a></dd>
                    <dd><a href="member_account_transaction.html">交易资料</a></dd>
                </dl>
            </div>
        </div>
        <div class="m_con fr">
            <div class="b-bar">
                <div class="b-title"><span>账号信息</span></div>
                <div class="b-con">
                    <div class="mt20 mb10">
                        <ul class="b-ul-list">
                            <li>
                                <span>姓名：</span><em>张正山</em>
                            </li>
                            <li>
                                <span>登陆密码：</span><em>安全性高的密码可以使帐号更安全。</em>
                                <span class="setting">
                                    <b>已设置</b>
                                    <a data-remote="true" href="javascript:void(0);"  id="edit_password" class="blue">
                                        <img class="mr5" src="images/edit.png" alt="Edit2" width="16" height="16">修改
                                    </a>
                                </span>
                            </li>
                            <li>
                                <span>手机认证：</span><em>验证后，可用于快速找回登录密码。</em>
                                <span class="setting"><b>已认证</b>19914503433 <a href="javascript:void(0);" id="edit_phone" class="blue"><img class="mr5" src="images/edit.png" width="16" height="16">修改</a></span>
                            </li>
                            <li>
                                <span>邮箱认证：</span><em>验证后，可用于接收询盘提醒，报价提醒及订单相关邮件。</em>
                                <span class="setting"><b>已验证</b>563315963@qq.com <a href="javascript:void(0);" id="edit_email"  class="blue"><img class="mr5" src="images/edit.png" width="16" height="16">修改</a></span>
                            </li>
                            <li>
                                <span>实名认证：</span><em>根据相关法律法规账号需实名认证。</em>
                                <span class="setting"><b>未认证</b><a href="member_account_real_name.html" class="blue">立即认证</a></span>
                            </li>
                        </ul>
                    </div>
                    <div class="clearfix"></div>

                </div>
            </div>
        </div>
        <div class="m_con fr mt15">
            <div class="b-bar">
                <div class="b-title"><span>公司信息</span></div>
                <div class="b-con">
                    <ul class="b-ul-info">
                        <li><span>公司名称：</span>南京娇宴集团</li>
                        <li><span>所属行业：</span>橡胶工业</li>
                        <li><span>公司类型：</span>精细化工厂（50人～100人）</li>
                        <li><span>公司网址：</span>http://www.jiaoyan.com</li>
                        <li><span>公司地址：</span>南京众彩物流</li>
                    </ul>
                    <div class="clearfix"> </div>
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
</div>
<div class="clearfix"></div>
<footer>
    <div class="footer">
        <div class="foot_con">
            <div class="ft_left">
                <div class="ft_service">
                    <img src="images/service.png">
                    <p class="yellow fz16 bold mt10">电话：025-66028182</p>
                    <p class="fz16 mt10">QQ：2850281398</p>
                    <p class="fz16 mt10">工作时间 8:30 - 17:30</p>
                </div>
            </div>
            <div class="ft_center">
                <dl>
                    <dt>新手上路</dt>
                    <dd><a href="">用户注册</a></dd>
                    <dd><a href="">隐私声明</a></dd>
                    <dd><a href="">使用须知</a></dd>
                    <dd><a href="">协议条款</a></dd>
                </dl>
                <dl>
                    <dt>联系我们</dt>
                    <dd><a href="">关于我们</a></dd>
                    <dd><a href="">联系我们</a></dd>
                    <dd><a href="">合作伙伴</a></dd>
                    <dd><a href="">通知公告</a></dd>
                </dl>
                <dl>
                    <dt>售后服务</dt>
                    <dd><a href="">开票服务</a></dd>
                    <dd><a href="">退换货服务</a></dd>
                    <dd><a href="">用户反馈</a></dd>
                    <dd><a href="">发货方式</a></dd>
                </dl>
                <dl>
                    <dt>帮助中心</dt>
                    <dd><a href="">售后政策</a></dd>
                    <dd><a href="">退换货说明</a></dd>
                    <dd><a href="">退款说明</a></dd>
                    <dd><a href="">产品目录</a></dd>
                </dl>
            </div>
            <div class="ft_right">
                <div class="ft_qrcode">
                    <img src="images/qrcode.jpg">
                    <p>关注公众号</p>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="copyright">
            <p>版权所有 Copyright(C)2020 南京一览生物科技有限公司 <a href="http://www.beian.miit.gov.cn/" style="color: #777272;">苏ICP备20017967号-1</a></p>
        </div>
    </div>
    <div class="clearfix"></div>
</footer>
</body>
</html>
<!--修改密码-->
<div id="edit_password_block" class="hidden">
    <form id="edit_password_form" action="http://www.buysellchem.com/member/account/update_password" accept-charset="UTF-8" data-remote="true" method="post">
        <input name="utf8" type="hidden" value="✓">
        <input type="hidden" name="_method" value="put">
        <input type="hidden" name="_token" value="HIUHfJnBXDJhVHxEO0vn8d2EtfQLpzMYUlQU9vvL">
        <table class="kqy_table">
            <tbody>
                <tr>
                    <td class="t1"><span class="red mr10">*</span>旧密码</td>
                    <td><input class="form_input wd300" id="user_old_password" name="user[old_password]" placeholder="请输入目前所用密码" type="password" value=""></td>
                </tr>
                <tr>
                    <td class="t1"><span class="red mr10">*</span>新密码</td>
                    <td><input class="form_input wd300" id="user_password" name="user[password]" placeholder="请输入6-20位由数字和字符组成的新密码" type="password" value=""></td>
                </tr>
                <tr>
                    <td class="t1"><span class="red mr10">*</span>确认密码</td>
                    <td><input class="form_input wd300" id="user_password_confirmation" name="user[password_confirmation]" placeholder="请输入6-20位由数字和字符组成的新密码" type="password" value=""></td>
                </tr>
                <tr>
                    <td colspan="2" align="center"><button class="submit_btn wdp60" type="button" onclick="javascript:void(0);" id="btn_edit_password">确认</button></td>
                </tr>
            </tbody>
        </table>
    </form>
</div>

<!--修改手机号码-->
<div id="edit_phone_block" class="hidden">
    <form id="auth_phone_form" action="http://www.buysellchem.com/member/account/verify_phone" accept-charset="UTF-8" data-remote="true" method="post">
        <input name="utf8" type="hidden" value="✓">
        <input type="hidden" name="_method" value="put">
        <input type="hidden" name="_token" value="HIUHfJnBXDJhVHxEO0vn8d2EtfQLpzMYUlQU9vvL">
        <table class="kqy_table">
            <tbody>
                <tr>
                    <td class="t1"><span class="red mr10">*</span>新手机号码</td>
                    <td><input class="form_input wd300" id="phone" name="phone" placeholder="请输入手机号码" type="text" value=""></td>
                </tr>
                <tr>
                    <td class="t1"><span class="red mr10">*</span>验证码</td>
                    <td>
                        <input class="form_input wd150" id="phone_code" name="phone_code" placeholder="请输入验证码" type="text" value="">
                        <button class="submit_btn_orange wd150" onclick="javascript:void(0);" id="phoneSendBtn">获取手机验证码</button>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center"><button class="submit_btn wdp60" type="button" onclick="javascript:void(0);" id="btn_edit_phone">确认</button></td>
                </tr>
            </tbody>
        </table>
    </form>
</div>

<!--修改邮箱-->
<div id="edit_email_block" class="hidden">
    <form id="auth_email_form" action="http://www.buysellchem.com/member/account/verify_email" accept-charset="UTF-8" data-remote="true" method="post">
        <input name="utf8" type="hidden" value="✓">
        <input type="hidden" name="_method" value="put">
        <input type="hidden" name="_token" value="HIUHfJnBXDJhVHxEO0vn8d2EtfQLpzMYUlQU9vvL">
        <table class="kqy_table">
            <tbody>
                <tr>
                    <td class="t1"><span class="red mr10">*</span>新邮箱</td>
                    <td><input class="form_input wd300" id="email" name="email" placeholder="请输入邮箱" type="text" value=""></td>
                </tr>
                <tr>
                    <td class="t1"><span class="red mr10">*</span>验证码</td>
                    <td>
                        <input class="form_input wd150" id="email_code" name="email_code" placeholder="请输入验证码" type="text" value="">
                        <button class="submit_btn_orange wd150" onclick="javascript:void(0);" id="emailSendBtn">获取邮箱验证码</button>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center"><button class="submit_btn wdp60" type="button" onclick="javascript:void(0);" id="btn_edit_email">确认</button></td>
                </tr>
            </tbody>
        </table>
    </form>
</div>
<script type="text/javascript">
    /*修改密码*/
    $("#edit_password").click(function () {
        layer.open({
            type: 1,
            title:'修改密码',
            skin: 'layui-layer-lan', //加上边框
            area: ['30%', '40%'], //宽高
            btnAlign: 'l',
            closeBtn:2,
            scrollbar:true,
            content: $("#edit_password_block"),
            end:function () {

            }
        });
    });

    $("#btn_edit_password").click(function () {

        if($.trim($("#user_old_password").val()).length == 0){
            layer.alert('请输入旧密码!',{
                skin: 'layui-layer-lan',
                anim: 4
            });
            return false;
        }
        if($.trim($("#user_password").val()).length <6){
            layer.alert('请输入至少6为新密码!',{
                skin: 'layui-layer-lan',
                anim: 4
            });
            return false;
        }
        if($.trim($("#user_password_confirmation").val()).length <6){
            layer.alert('请输入至少6位的重复密码!',{
                skin: 'layui-layer-lan',
                anim: 4
            });
            return false;
        }
        if($.trim($("#user_password").val()) != $.trim($("#user_password_confirmation").val()) ){
            layer.alert('两次输入密码不一致!',{
                skin: 'layui-layer-lan',
                anim: 4
            });
            return false;
        }
        $.ajax({
            url: $("#edit_password_form").attr('action'),
            data: $("#edit_password_form").serializeArray(),
            type: 'post',
            cache: false,
            dataType: 'json',
            success: function (data) {
                layer.alert(data.msg,{
                    skin: 'layui-layer-lan',
                    anim: 4
                });
            },
            error: function () {
                layer.msg('系统异常，请联系客服人员！', {icon: 2});
            }
        });
    });

    /*修改手机号码*/
    $("#edit_phone").click(function () {
        layer.open({
            type: 1,
            title:'修改手机号码',
            skin: 'layui-layer-lan', //加上边框
            area: ['30%', '40%'], //宽高
            btnAlign: 'l',
            closeBtn:2,
            scrollbar:true,
            content: $("#edit_phone_block"),
            end:function () {

            }
        });
    });

    //发送手机验证码
    $("#phoneSendBtn").click(function(){
        var phone = $.trim($("#phone").val());
        var o = this;
        if (isPhoneNo(phone) == false) {
            layer.alert('请输入合法的手机号码!',{
                skin: 'layui-layer-lan',
                anim: 4
            });
            return false;
        }
        //发送验证码
        $.ajax({
            url: "http://www.buysellchem.com/users/send_sms_register_code",
            data: { "_token": "HIUHfJnBXDJhVHxEO0vn8d2EtfQLpzMYUlQU9vvL", "phone": phone},
            type: "post",
            dataType: 'json',
            success:function (data) {
                if(data.data.code == "SUCCESS"){
                    get_code_time(o);
                }
                layer.alert(data.msg,{
                    skin: 'layui-layer-lan',
                    anim: 4
                });
            },
            error:function () {
                layer.msg('系统异常，请联系客服人员！', {icon: 2});
            }

        });
    });

    $("#btn_edit_phone").click(function () {
        if($.trim($("#phone").val()) == ''){
            layer.alert('请填写认证的手机号码!',{
                skin: 'layui-layer-lan',
                anim: 4
            });
            return false;
        }

        if (isPhoneNo($.trim($("#phone").val())) == false) {
            layer.alert('请输入合法的手机号码!',{
                skin: 'layui-layer-lan',
                anim: 4
            });
            return false;
        }

        if($.trim($("#phone_code").val()).length !== 6){
            layer.alert('请填写正确6位手机验证码!',{
                skin: 'layui-layer-lan',
                anim: 4
            });
            return false;
        }

        $.ajax({
            url: $("#auth_phone_form").attr('action'),
            data: $("#auth_phone_form").serializeArray(),
            type: 'post',
            cache: false,
            dataType: 'json',
            success: function (data) {
                layer.alert(data.msg,{
                    skin: 'layui-layer-lan',
                    anim: 4
                });
            },
            error: function () {
                layer.msg('系统异常，请联系客服人员！', {icon: 2});
            }
        });

    });

    /*邮箱验证*/
    $("#edit_email").click(function () {
        layer.open({
            type: 1,
            title:'修改邮箱',
            skin: 'layui-layer-lan', //加上边框
            area: ['30%', '40%'], //宽高
            btnAlign: 'l',
            closeBtn:2,
            scrollbar:true,
            content: $("#edit_email_block"),
            end:function () {

            }
        });
    });

    //发送email验证码
    $("#emailSendBtn").click(function(){
        var email = $.trim($("#email").val());
        var o = this;
        if (isEmail(email) == false) {
            layer.alert('请输入合法的邮箱!',{
                skin: 'layui-layer-lan',
                anim: 4
            });
            return false;
        }
        //发送验证码
        $.ajax({
            url: "http://www.buysellchem.com/users/send_email_register_code",
            data: { "_token": "HIUHfJnBXDJhVHxEO0vn8d2EtfQLpzMYUlQU9vvL", "email": email, "from": 'buysellchem' },
            type: "post",
            dataType: 'json',
            success:function (data) {
                if(data.data.code == "SUCCESS"){
                    get_code_time(o);
                }
                layer.alert(data.msg,{
                    skin: 'layui-layer-lan',
                    anim: 4
                });
            },
            error:function () {
                layer.msg('系统异常，请联系客服人员！', {icon: 2});
            }

        });
    });

    $("#btn_edit_email").click(function () {
           if (isEmail($.trim($("#phone").val())) == false) {
            layer.alert('请输入合法的邮箱!',{
                skin: 'layui-layer-lan',
                anim: 4
            });
            return false;
        }

        if($.trim($("#email_code").val()).length !== 6){
            layer.alert('请填写正确6位邮箱验证码!',{
                skin: 'layui-layer-lan',
                anim: 4
            });
            return false;
        }

        $.ajax({
            url: $("#auth_email_form").attr('action'),
            data: $("#auth_email_form").serializeArray(),
            type: 'post',
            cache: false,
            dataType: 'json',
            success: function (data) {
                layer.alert(data.msg,{
                    skin: 'layui-layer-lan',
                    anim: 4
                });
            },
            error: function () {
                layer.msg('系统异常，请联系客服人员！', {icon: 2});
            }
        });

    });
</script>